package edu.ustb.efws.pipeline.domain;

import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.Objects;
import java.util.StringJoiner;

/**
 * 空压机日志
 *
 * @author TS Group
 */
public class KyjLog {
    @ApiModelProperty("编号")
    private Long id;
    @ApiModelProperty("传感器编号")
    private Integer detectorId;
    @ApiModelProperty("月份(yyyyMM)")
    private Integer month;
    @ApiModelProperty("电流1")
    private Float i1;
    @ApiModelProperty("电流2")
    private Float i2;
    @ApiModelProperty("电流3")
    private Float i3;
    @ApiModelProperty("最大电流")
    private Float maxI;
    @ApiModelProperty("采集时间")
    private Date collectTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getDetectorId() {
        return detectorId;
    }

    public void setDetectorId(Integer detectorId) {
        this.detectorId = detectorId;
    }

    public Integer getMonth() {
        return month;
    }

    public void setMonth(Integer month) {
        this.month = month;
    }

    public Float getI1() {
        return i1;
    }

    public void setI1(Float i1) {
        this.i1 = i1;
    }

    public Float getI2() {
        return i2;
    }

    public void setI2(Float i2) {
        this.i2 = i2;
    }

    public Float getI3() {
        return i3;
    }

    public void setI3(Float i3) {
        this.i3 = i3;
    }

    public Float getMaxI() {
        return maxI;
    }

    public void setMaxI(Float maxI) {
        this.maxI = maxI;
    }

    public Date getCollectTime() {
        return collectTime;
    }

    public void setCollectTime(Date collectTime) {
        this.collectTime = collectTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        KyjLog kyjLog = (KyjLog) o;
        return Objects.equals(id, kyjLog.id) && Objects.equals(detectorId, kyjLog.detectorId) && Objects.equals(month, kyjLog.month) && Objects.equals(i1, kyjLog.i1) && Objects.equals(i2, kyjLog.i2) && Objects.equals(i3, kyjLog.i3) && Objects.equals(maxI, kyjLog.maxI) && Objects.equals(collectTime, kyjLog.collectTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, detectorId, month, i1, i2, i3, maxI, collectTime);
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", KyjLog.class.getSimpleName() + "[", "]")
                .add("id=" + id)
                .add("detectorId=" + detectorId)
                .add("month=" + month)
                .add("i1=" + i1)
                .add("i2=" + i2)
                .add("i3=" + i3)
                .add("maxI=" + maxI)
                .add("collectTime=" + collectTime)
                .toString();
    }
}
